public class demo08 {
    public static void main(String[] args) {
        int[] a=new int[]{3,12,5,6,11,8,7};
        int max=0;
        int min=999999;
        int b=0;
        for (int i=0;i<a.length;i++){
            b=a[i];
            if (b>max){
                max=b;
            }
            if(b<min){
                min=b;
            }
        }
        System.out.println("最大值"+max+"最小值"+min);
    }
}
